<template>
    <div>
    <Button @click="toOther">跳转到 DemoRoute</Button>
    </div>
</template>

<script>
    export default {
        name: "TestRoute",
        data() {
            return {}
        },
        methods: {
            toOther() {

                //router.push({ name: 'user', params: { userId }}) // -> /user/123


                this.$router.push({name: 'DemoRoute', params: {userId: '123'}})
            }
        }
    }
</script>

<style scoped>

</style>
